(function($){
    
    $.fn.bind_once = function(event,fn){
        
        return this.each(function(){
            
            var $this = $(this);
            
            var events = ($this.data("events")) ? $this.data("events") : {};
            
//            con.log("events",events)
            
            var has_event = (events[event] != undefined) ? true : false;
            
//            con.log("events.event",events[event])
//            con.log("has_event",has_event)
            
            if(!has_event){
                con.log("bind once");
                $this.bind(event,fn);
                return;
            }
            con.log("no binding");
        })
        
    }
    
})(jQuery)